package com.fjsh.anno;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * 防重复提交注解
 */
@Documented
@Retention(RUNTIME)
@Target({ TYPE, METHOD })
public @interface Duplicate {

    /**
     * 获取锁的等待时间
     */
    int waitTime() default 0;

    /**
     * 默认5秒后可继续提交
     */
    int leaseTime() default 5000;

}
